/*
 * Created on May 27, 2010
 */
package com.mgmaps.app;

import javax.microedition.lcdui.Image;
import com.nutiteq.components.Place;

public abstract class APPPlace {
  
  protected int id;
  protected String name;
  protected Place place;
  
  /**
   * Getter for ID.
   * @return id
   */
  public int getID() {
    return id;
  }
  
  /**
   * Getter for name.
   * @return name
   */
  public String getName() {
    return name;
  }

  /**
   * Getter for place.
   * @return place
   */
  public Place getPlace() {
    return place;
  }

  /**
   * Equals method.
   * 
   * @param other other APPPlace object
   * @return true if the IDs are equal
   * @see java.lang.Object#equals(java.lang.Object)
   */
  public boolean equals(Object other) {
    if ((other == null) || !(other instanceof APPPlace))
      return false;
    final APPPlace ap = (APPPlace) other;
    return ap.getID() == getID();
  }
  
  public abstract int getIconWidth();
  public abstract int getIconHeight();
  public abstract int getAnchorX();
  public abstract int getAnchorY();
  public abstract Image getIcon();
  public abstract boolean onMap();

}
